<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><s:text name="admin.list.title"/></title>
	<%@ include file="/common/meta.jsp"%>
	<%@ include file="/common/common.jsp"%>
</head>
<body>
<div class="listboxb" id="listbox">
		<div class="powerlist" id="powerlist">
			<p>
				<strong><s:text name="admin.setting"/></strong>
				<div class="powerbox">
				<table>
				<ul>
					<tr>
						<td><s:text name="admin.list.title"></s:text> &nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><s:text name="admin.loginName"></s:text> &nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><s:text name="admin.realName"></s:text> &nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><s:text name="admin.nickName"></s:text> </td>
					</tr>
				    <s:iterator  value="adminSelectList">
				    <tr>
				    	<td><input type="checkbox"  id="<s:property value="adminId"/>"  name="adminId"  value="<s:property value="adminId"/>"/></td>
				    	<td><input name="loginName" id="loginName_<s:property value="adminId"/>" value="<s:property value="loginName"/>" type="text" /> </td>
				    	<td><input name="realName" id="realName_<s:property value="adminId"/>" value="<s:property value="realName"/>" type="text" /> </td>
				    	<td><input name="nickName" value="<s:property value="nickName"/>" type="text" /> </td>
				    </tr>
					</s:iterator>
				</ul>
				</table>
				</div>
			</p>
		</div>
		<div class="btnbox">
			<input type="button" value="<s:text name="save"/>"  class="btnlist2" id="saveas" onclick="all_getSelected();" />
			<input type="reset" value="<s:text name="reset"/>"  class="btnlist2" />
		</div>
	</div>
</body>
</html>
<script type="text/javascript" defer="defer">
	actionName = "admin";	
	confirmStr = "<s:text name="delete.confirm"/>";
	chiocenothing = "<s:text name="chiocenothing"/>";
	$(function(){
	});
	
function all_getSelected(){
	var arr="";
 	var s =$("input[name='adminId']:checked");
 	if(s.length<=0) 
 	{
 		alert("请选择");
 		return ;
 	}
	for(var i =0;i<s.length;i++){
   		var id=$(s[i]).val();
   		var loginName=$("input[id='loginName_"+id+"']").val();
   		var realName=$("input[id='realName_"+id+"']").val();
   		if(loginName==""){loginName="null";}
   		if(realName==""){realName="null";}
   		arr=arr+"@"+loginName+"$"+realName;
   	}
	arr=arr.substring(1);
	$.post("${ctx}/system/admin-getselectedadmins.action?adminIds="+arr,function(data){
		alert(data);
	});  
}
	</script>